﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PlutoStudio.EntityFramework
{
    public abstract class EntityTypeConfiguration<TEntity> : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<TEntity>, IEntityMapper where TEntity:EntityBase
    {
        public EntityTypeConfiguration()
        {
            ConfigurationAppend();
        }

        protected abstract void ConfigurationAppend();
        public void RegistTo(System.Data.Entity.ModelConfiguration.Configuration.ConfigurationRegistrar configurations)
        {
            configurations.Add(this);
        }


      
    }

    public abstract class ComplexTypeConfiguration<TEntity> : System.Data.Entity.ModelConfiguration.ComplexTypeConfiguration<TEntity>, IEntityMapper where TEntity:EntityBase
    {
        public ComplexTypeConfiguration()
        {
            ConfigurationAppend();
        }

        protected abstract void ConfigurationAppend();
        public void RegistTo(System.Data.Entity.ModelConfiguration.Configuration.ConfigurationRegistrar configurations)
        {
            configurations.Add(this);
        }


    
    }

}
